package com.huarui.purchaseOrder.model;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import org.ewaf.framework.model.BaseDataObject;

/**
 * 采购订单
 * 
 * @author ycf
 * 
 */
public class PurOrSaleOrder extends BaseDataObject {
	
	private static final long serialVersionUID = -9116375592509087328L;

	/**
	 * 初始状态
	 */
	public static final String STATUS_INITIAL = "-1";
	
	/**
	 * 草稿状态
	 */
	public static final String STATUS_TMP = "0";

	/**
	 * 待买方接受
	 */
	public static final String STATUS_WAIT_BUYER_ACPT = "1";

	/**
	 * 待卖方接受
	 */
	public static final String STATUS_WAIT_SELLER_ACPT = "2";

	/**
	 * 待卖方发货
	 */
	public static final String STATUS_WAIT_SELLER_DELIVERY = "3";

	/**
	 * 卖方已发货
	 */
	public static final String STATUS_SELLER_DELIVERY = "4";
	
	/**
	 * 买方已收货
	 */
	public static final String STATUS_BUYER_ACPT = "5";
	
	/**
	 * 作废
	 */
	public static final String STATUS_INVALIDE = "6";
	
	/**
	 * 同意收货
	 */
	public static final String STATUS_AGREE_TO_RECIEVE = "7";
	
	/**
	 * 已经删除
	 */
	public static final String STATUS_DELETED = "8";
	
	public static final String Y = "Y";
	
	public static final String N = "N";

	/**
	 * 主键
	 */
	private Integer id;

	/**
	 * 卖方ID
	 */
	private Integer sellerId;

	/**
	 * 卖方在买方系统中的客户ID(取单据号产生器的purchaseOrder)
	 */
	private Integer partnerIdByBuyer;
	
	private String partnerNameByBuyer;

	/**
	 * 买方ID
	 */
	private Integer buyerId;

	/**
	 * 买方在卖方系统中的客户ID(卖方在接受订单后，如果买方已是客户，从partner表中找出此ID，更新，如果没有，添加后更新)
	 * (取单据号产生器的saleOrder)
	 */
	private Integer partnerIdBySeller;
	
	private String partnerNameBySeller;

	/**
	 * 买方的单据号
	 */
	private String codeOfBuyer;

	/**
	 * 卖方的单据号(卖方单据号在卖方接受单据后产生,从买方来看这个是一个受理号)
	 */
	private String codeOfSeller;
	
	/**
	 * 引用订单的入库单ID
	 */
	private Integer receivedId;
	
	/**
	 * 引用订单的销售单ID
	 */
	private Integer saleId;

	/**
	 * 状态(0=草稿，1=待处理，2=已处理，3=已发货，4=已收货)
	 */
	private String status;

	/**
	 * 创建人(操作员)
	 */
	private Integer creatorId;
	
	private Integer creatorCompanyId;

	/**
	 * 创建时间(非手工录入)
	 */
	private Date gmtCreate;

	/**
	 * 提交者ID
	 */
	private Integer submitterId;

	/**
	 * 提交时间(非手工录入)
	 */
	private Date gmtSubmit;

	/**
	 * 发货者ID
	 */
	private Integer deliveryerId;

	/**
	 * 发货时间(非手工录入)
	 */
	private Date gmtDelivery;

	/**
	 * 收货者ID
	 */
	private Integer acceptorId;

	/**
	 * 收货时间(非手工录入)
	 */
	private Date gmtAccept;

	/**
	 * 买方备注
	 */
	private String memoOfBuyer;

	/**
	 * 卖方备注
	 */
	private String memoOfSeller;

	/**
	 * 城区ID
	 */
	private Integer areaId;

	/**
	 * 省份名
	 */
	private String province;

	/**
	 * 城市名
	 */
	private String city;

	/**
	 * 城区名
	 */
	private String district;

	/**
	 * 详细地址
	 */
	private String street;

	/**
	 * 邮编
	 */
	private String postCode;

	/**
	 * 收货人姓名
	 */
	private String receiverName;
	
	/**
	 * 处理人
	 */
	private Integer takeoverId;
	
	/**
	 * 处理时间
	 */
	private Date gmtTakeover;

	/**
	 * 电话
	 */
	private String phone;

	/**
	 * 手机
	 */
	private String mobile;

	/**
	 * 包装类型
	 */
//	private String packageType;

	/**
	 * 运输类型
	 */
	private String transportType;

	/**
	 * 发票类型
	 */
//	private String invoiceType;

	/**
	 * 支付方式
	 */
	private String paymentType;

	/**
	 * 保值方式
	 */
//	private String insurenceType;
	
	/**
	 * 流程ID
	 */
	private Integer workFlowId;
	
	/**
	 * 当前处理人ID
	 */
	private Integer currentorId;
	
	/**
	 * 金额
	 */
	private BigDecimal amount;
	
	private String buyerName;
	
	private String sellerName;
	
	private String creatorCompanyName;
	
	private String creatorName;
	
	private String submitterName;
	
	private String takeoverName;
	
	private String deliveryerName;
	
	private String acceptorName;
	
	private String currentorName;
	
	private Integer currentCompanyId;
	
	private String currentCompanyName;
	
	private String partnerPyCodeByBuyer;
	
	private String partnerPyCodeBySeller;
	
	/**
	 * 非数据库字段
	 */
	private Integer actionId;
	
	/**
	 * 非数据库字段
	 */
	private String actionName;
	
//	private String statusName;
	
//	public String getStatusName() {
//		return statusName;
//	}
//
//	public void setStatusName(String statusName) {
//		this.statusName = statusName;
//	}

	public Integer getActionId() {
		return actionId;
	}

	public void setActionId(Integer actionId) {
		this.actionId = actionId;
	}

	public String getActionName() {
		return actionName;
	}

	public void setActionName(String actionName) {
		this.actionName = actionName;
	}

	public Integer getCurrentCompanyId() {
		return currentCompanyId;
	}

	public void setCurrentCompanyId(Integer currentCompanyId) {
		this.currentCompanyId = currentCompanyId;
	}

	public String getCurrentCompanyName() {
		return currentCompanyName;
	}

	public void setCurrentCompanyName(String currentCompanyName) {
		this.currentCompanyName = currentCompanyName;
	}
	
	public String getBuyerName() {
		return buyerName;
	}

	public void setBuyerName(String buyerName) {
		this.buyerName = buyerName;
	}

	public String getSellerName() {
		return sellerName;
	}

	public void setSellerName(String sellerName) {
		this.sellerName = sellerName;
	}

	public String getCreatorCompanyName() {
		return creatorCompanyName;
	}

	public void setCreatorCompanyName(String creatorCompanyName) {
		this.creatorCompanyName = creatorCompanyName;
	}

	public String getCreatorName() {
		return creatorName;
	}

	public void setCreatorName(String creatorName) {
		this.creatorName = creatorName;
	}

	public String getSubmitterName() {
		return submitterName;
	}

	public void setSubmitterName(String submitterName) {
		this.submitterName = submitterName;
	}

	public String getTakeoverName() {
		return takeoverName;
	}

	public void setTakeoverName(String takeoverName) {
		this.takeoverName = takeoverName;
	}

	public String getDeliveryerName() {
		return deliveryerName;
	}

	public void setDeliveryerName(String deliveryerName) {
		this.deliveryerName = deliveryerName;
	}

	public String getAcceptorName() {
		return acceptorName;
	}

	public void setAcceptorName(String acceptorName) {
		this.acceptorName = acceptorName;
	}

	public String getCurrentorName() {
		return currentorName;
	}

	public void setCurrentorName(String currentorName) {
		this.currentorName = currentorName;
	}

	private List<PurOrSaleOrderDetail> list;

	public List<PurOrSaleOrderDetail> getList() {
		return list;
	}

	public void setList(List<PurOrSaleOrderDetail> list) {
		this.list = list;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Integer getSellerId() {
		return sellerId;
	}

	public void setSellerId(Integer sellerId) {
		this.sellerId = sellerId;
	}

	public String getPartnerNameByBuyer() {
		return partnerNameByBuyer;
	}

	public void setPartnerNameByBuyer(String partnerNameByBuyer) {
		this.partnerNameByBuyer = partnerNameByBuyer;
	}

	public String getPartnerNameBySeller() {
		return partnerNameBySeller;
	}

	public void setPartnerNameBySeller(String partnerNameBySeller) {
		this.partnerNameBySeller = partnerNameBySeller;
	}

	public Integer getPartnerIdByBuyer() {
		return partnerIdByBuyer;
	}

	public void setPartnerIdByBuyer(Integer partnerIdByBuyer) {
		this.partnerIdByBuyer = partnerIdByBuyer;
	}

	public Integer getCreatorCompanyId() {
		return creatorCompanyId;
	}

	public void setCreatorCompanyId(Integer creatorCompanyId) {
		this.creatorCompanyId = creatorCompanyId;
	}

	public Integer getBuyerId() {
		return buyerId;
	}

	public void setBuyerId(Integer buyerId) {
		this.buyerId = buyerId;
	}

	public Integer getPartnerIdBySeller() {
		return partnerIdBySeller;
	}

	public void setPartnerIdBySeller(Integer partnerIdBySeller) {
		this.partnerIdBySeller = partnerIdBySeller;
	}

	public String getCodeOfBuyer() {
		return codeOfBuyer;
	}

	public void setCodeOfBuyer(String codeOfBuyer) {
		this.codeOfBuyer = codeOfBuyer;
	}

	public String getCodeOfSeller() {
		return codeOfSeller;
	}

	public void setCodeOfSeller(String codeOfSeller) {
		this.codeOfSeller = codeOfSeller;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public Integer getCreatorId() {
		return creatorId;
	}

	public void setCreatorId(Integer creatorId) {
		this.creatorId = creatorId;
	}

	public Date getGmtCreate() {
		return gmtCreate;
	}

	public void setGmtCreate(Date gmtCreate) {
		this.gmtCreate = gmtCreate;
	}

	public Integer getDeliveryerId() {
		return deliveryerId;
	}

	public void setDeliveryerId(Integer deliveryerId) {
		this.deliveryerId = deliveryerId;
	}

	public Integer getAcceptorId() {
		return acceptorId;
	}

	public void setAcceptorId(Integer acceptorId) {
		this.acceptorId = acceptorId;
	}

	public Date getGmtSubmit() {
		return gmtSubmit;
	}

	public void setGmtSubmit(Date gmtSubmit) {
		this.gmtSubmit = gmtSubmit;
	}

	public Date getGmtDelivery() {
		return gmtDelivery;
	}

	public void setGmtDelivery(Date gmtDelivery) {
		this.gmtDelivery = gmtDelivery;
	}

	public Date getGmtAccept() {
		return gmtAccept;
	}

	public void setGmtAccept(Date gmtAccept) {
		this.gmtAccept = gmtAccept;
	}

	public String getMemoOfBuyer() {
		return memoOfBuyer;
	}

	public void setMemoOfBuyer(String memoOfBuyer) {
		this.memoOfBuyer = memoOfBuyer;
	}

	public String getMemoOfSeller() {
		return memoOfSeller;
	}

	public void setMemoOfSeller(String memoOfSeller) {
		this.memoOfSeller = memoOfSeller;
	}

	public Integer getAreaId() {
		return areaId;
	}

	public void setAreaId(Integer areaId) {
		this.areaId = areaId;
	}

	public String getProvince() {
		return province;
	}

	public void setProvince(String province) {
		this.province = province;
	}

	public String getCity() {
		return city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	public String getDistrict() {
		return district;
	}

	public void setDistrict(String district) {
		this.district = district;
	}

	public String getStreet() {
		return street;
	}

	public void setStreet(String street) {
		this.street = street;
	}

	public String getPostCode() {
		return postCode;
	}

	public void setPostCode(String postCode) {
		this.postCode = postCode;
	}

	public String getReceiverName() {
		return receiverName;
	}

	public void setReceiverName(String receiverName) {
		this.receiverName = receiverName;
	}

	public Integer getTakeoverId() {
		return takeoverId;
	}

	public void setTakeoverId(Integer takeoverId) {
		this.takeoverId = takeoverId;
	}

	public Date getGmtTakeover() {
		return gmtTakeover;
	}

	public void setGmtTakeover(Date gmtTakeover) {
		this.gmtTakeover = gmtTakeover;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

//	public String getPackageType() {
//		return packageType;
//	}
//
//	public void setPackageType(String packageType) {
//		this.packageType = packageType;
//	}

	public String getTransportType() {
		return transportType;
	}

	public void setTransportType(String transportType) {
		this.transportType = transportType;
	}

//	public String getInvoiceType() {
//		return invoiceType;
//	}
//
//	public void setInvoiceType(String invoiceType) {
//		this.invoiceType = invoiceType;
//	}

	public String getPaymentType() {
		return paymentType;
	}

	public void setPaymentType(String paymentType) {
		this.paymentType = paymentType;
	}

	public Integer getWorkFlowId() {
		return workFlowId;
	}

	public void setWorkFlowId(Integer workFlowId) {
		this.workFlowId = workFlowId;
	}

	public Integer getCurrentorId() {
		return currentorId;
	}

	public void setCurrentorId(Integer currentorId) {
		this.currentorId = currentorId;
	}

	public Integer getReceivedId() {
		return receivedId;
	}

	public void setReceivedId(Integer receivedId) {
		this.receivedId = receivedId;
	}

	public Integer getSaleId() {
		return saleId;
	}

	public void setSaleId(Integer saleId) {
		this.saleId = saleId;
	}

	public Integer getSubmitterId() {
		return submitterId;
	}

	public void setSubmitterId(Integer submitterId) {
		this.submitterId = submitterId;
	}

	public BigDecimal getAmount() {
		return amount;
	}

	public void setAmount(BigDecimal amount) {
		this.amount = amount;
	}

	public String getPartnerPyCodeByBuyer() {
		return partnerPyCodeByBuyer;
	}

	public void setPartnerPyCodeByBuyer(String partnerPyCodeByBuyer) {
		this.partnerPyCodeByBuyer = partnerPyCodeByBuyer;
	}

	public String getPartnerPyCodeBySeller() {
		return partnerPyCodeBySeller;
	}

	public void setPartnerPyCodeBySeller(String partnerPyCodeBySeller) {
		this.partnerPyCodeBySeller = partnerPyCodeBySeller;
	}

	
}
